|
|
10.1 | TCP Operation | ||
| 10.1.7 | UDP operation |
|
The TCP/IP protocol stack contains many
different protocols, each designed to perform a certain task. IP
provides Layer 3 connectionless transport through an internetwork. TCP
enables connection-oriented, reliable transmission of packets at Layer
4 of the OSI model. UDP provides connectionless, non-guaranteed
transmission of packets at Layer 4 of the OSI model. Both TCP and UDP use IP as their
underlying Layer 3 protocol. In addition, TCP and UDP are used by
various application layer protocols. TCP provides services for
applications, such as FTP, HTTP, SMTP, and DNS. UDP is the transport
layer protocol used by DNS, TFTP, SNMP, and DHCP.
TCP must be used when applications need to guarantee that a packet arrives intact, in sequence, and unduplicated. The overhead associated with ensuring delivery of the packet is sometimes a problem when using TCP. Not all applications need to guarantee delivery of the data packet, so they use the faster, connectionless delivery mechanism afforded by UDP. The UDP protocol standard, described in RFC 768, is a simple protocol that exchanges segments without acknowledgments or guaranteed delivery. UDP does not use windowing or
acknowledgments so application layer protocols must provide error
detection.
Once a UDP segment arrives at the destination IP address, a mechanism must exist which allows the receiving host to determine the exact destination application. Destination ports are used for this purpose. If a host is running both TFTP and DNS services, it must be able to determine what service the arriving UDP segments need. The Destination Port field in the UDP header determines the application to which a UDP segment will be delivered.
|